#include "teacherinfo.h"

#include <QDebug>

TeacherInfo::TeacherInfo()
{
    m_id.clear();
    m_teacherID.clear();
    m_XID.clear();
    m_Name.clear();
    m_Sex.clear();
    m_Birth.clear();
    m_pswd.clear();
}

TeacherInfo::TeacherInfo(const QString &id, const QString &teacherID,
                         const QString &XID, const QString &Name,const QString
                                  &Sex, const QString &Birth, const QString &pswd)
{
    m_id = id;
    m_pswd = pswd;
    m_XID = XID;
    m_Name = Name;
    m_Sex = Sex;
    m_Birth = Birth;
    m_teacherID = teacherID;
}

TeacherInfo::~TeacherInfo()
{

}

void TeacherInfo::display() const
{
    qDebug() << "--------------Disp TeacherInfo---------------";
    qDebug() << "ID: " << m_id;
    qDebug() << "m_pswd: " << m_pswd;
    qDebug() << "m_XID: " << m_XID ;
    qDebug() << "m_Name: " << m_Name;
    qDebug() << "m_Sex: " << m_Sex;
    qDebug() << "m_Birth: " << m_Birth;
    qDebug() << "m_teacherID: " << m_teacherID;
    qDebug() << "--------------TeacherInfo End----------------";
}
void TeacherInfo::updateTeacherInfo(const TeacherInfo &info)
{
    m_id = info.getID();
    m_pswd = info.getpswd();
    m_teacherID = info.getteacherID();
    m_Birth = info.getBirth();
    m_Name = info.getName();
    m_XID = info.getXID();
    m_Sex= info.getSex();
}

void TeacherInfo::updateTeacherInfo(const QString &id, const QString &teacherID,
                                    const QString &XID, const QString &Name,const QString
                                             &Sex, const QString &Birth, const QString &pswd)
{
    m_id = id;
    m_pswd = pswd;
    m_XID = XID;
    m_Name = Name;
    m_Sex = Sex;
    m_Birth = Birth;
    m_teacherID = teacherID;
}

void TeacherInfo::setID(const QString &id)
{
    m_id = id;
}

const QString &TeacherInfo::getID() const
{
    return m_id;
}

void TeacherInfo::setteacherID(const QString &teacherID)
{
    m_teacherID = teacherID;
}

const QString &TeacherInfo::getteacherID() const
{
   return  m_teacherID;
}

void TeacherInfo::setXID(const QString &XID)
{
    m_XID = XID;
}

const QString &TeacherInfo::getXID() const
{
     return m_XID;
}

void TeacherInfo::setName(const QString &Name)
{
    m_Name = Name;
}

const QString &TeacherInfo::getName() const
{
    return m_Name;
}

void TeacherInfo::setBirth(const QString &Birth)
{
    m_Birth = Birth;
}

const QString &TeacherInfo::getBirth() const
{
    return m_Birth;
}

void TeacherInfo::setSex(const QString &Sex)
{
    m_Sex = Sex;
}

const QString &TeacherInfo::getSex() const
{
    return m_Sex;
}

void TeacherInfo::setpswd(const QString &pswd)
{
    m_pswd = pswd;
}

const QString &TeacherInfo::getpswd() const
{
    return m_pswd;
}

